{extend name="admin@public:base" /}

{block name="header"}<link rel="stylesheet" type="text/css" href="__STATIC__/google/css/css.css"/>{/block}

{block name="content_body"}
	<div class="block-header">
		<h5>管理员列表</h5>
	</div>		
	<div class="card">
        <div class="header">
            <a href="{:url('admin/center.admin/user_edit')}">新增账号</a>

        </div>
		<div class="body table-responsive">
            <div class="row">
                <div class="col-sm-12">
                    <table class="table table-striped table-hover">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>名字</th>     
                                <th>账号组</th>                           
                                <th>加入时间</th>
                                <th>上次登陆IP</th>
                                <th>上次登陆位置</th>
                                <th>上次登陆时间</th>             
                                <th>登陆次数</th>             
                                <th>是否激活</th> 
                            </tr>
                        </thead>
                        <tbody>
                            {foreach $users as $key=>$vo}
                                <tr>
                                    <td>{$vo['id']}</td>
                                    <td>{$vo['username']}</td>
                                    <td>{$vo['group_title']|default=''}</td>                            
                                    <td>{$vo['addtime']}</td>
                                    <td>{$vo['last_login_ip']}</td>
                                    <td>{$vo['last_addr']}</td>
                                    <td>{$vo['last_login_time']}</td>
                                    <td>{$vo['login_count']}</td>
                                    <td>
                                        {eq name="vo['is_disabled']" value="0"} 
                                        <a class="red open_btn" href="{:url('admin/center.admin/user_edit', array('uid'=>$vo['id']))}">
                                        <div><button class="btn btn-minier btn-yellow">开启</button></div>
                                        </a>
                                        {else/}
                                        <a class="red open_btn" href="{:url('admin/center.admin/user_edit', array('uid'=>$vo['id']))}">
                                        <div><button class="btn btn-minier btn-danger">禁用</button></div>
                                        </a>                                        
                                        {/eq}
                                    </td>
                                    <td>
                                               
                                    <a href="{:url('admin/center.admin/user_edit', array('uid'=> $vo['id']))}">修改</a>
                                    &nbsp;&nbsp;
                                    <a href="{:url('admin/center.admin/user_del', array('uid'=> $vo['id']))}"  data-info="你确定要删除吗？" class="tooltip-error confirm-rst-url-btn" data-rel="tooltip" title="" data-original-title="删除">删除</a>
                                    </td>

                                </tr>
                            {/foreach}
                        </tbody>
                        <tfoot>                    
                            <tr><td colspan="9">                            
                                {$page|raw}                            
                            </td></tr>
                        </tfoot>
                    </table>                    
                </div>                
            </div>
           <!--  <div class="row">
                <div class="col-sm-5">
                    xxx
                </div>
                <div class="col-sm-7">
                    {$page|raw}
                </div>
            </div> -->
		
		</div>

	</div>	
{/block}

